/**
 * Created by LeungZ on 2016/8/10.
 */
import './notification.scss';
import temp from './error.html';
class Notification {
    $get(uiNotification, $document) {
        "ngInject";
        let getTitle = ()=> {
            return $document.find('header > h4').text().trim();
        };
        return {
            success: msg=> {
                return uiNotification.success({
                    title: getTitle(),
                    message: msg,
                    positionX: "right",
                    positionY: "bottom",
                    method: "success",
                    delay: 5000
                })
            },
            error: msg => {
                return uiNotification.error({
                    message: msg,
                    positionX: "right",
                    positionY: "bottom",
                    method: "error",
                    // templateUrl: temp,
                    delay: 5000
                })
            }
        };
    }
}
export default Notification;